const utils = {
  toast(title = "加载错误") {
    wx.showToast({
      title,
      mask: true,
      icon: 'none'
    })
  },
  // 时间数据转换
  formatTime(num) {
    const t = new Date(num)
    let year = t.getFullYear()
    let month = t.getMonth() + 1
    month = ('0' + month).slice(-2)
    let day = t.getDate()
    day = ('0' + day).slice(-2)
    return year + '/' + month + '/' + day
  }
}

wx.utils = utils
export default utils